//
//  OuptPrescListModel.m
//  掌上宏力
//
//  Created by admin on 2017/5/15.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "OuptPrescListModel.h"

@implementation OuptPrescListModel
/*
 //VISIT_DATE
 @property (nonatomic,copy) NSString *visitDate;
 //VISIT_NO
 @property (nonatomic,copy) NSString *visitNo;
 //DEPT_NAME
 @property (nonatomic,copy) NSString *depeName;
 //DOCTOR
 @property (nonatomic,copy) NSString *doctor;
 //药品名称 DRUG_NAME
 @property (nonatomic,copy) NSString *drugName;
 //单位 UNITS
 @property (nonatomic,copy) NSString *units;
 //数量 AMOUNT
 @property (nonatomic,copy) NSString *amount;
 //方法 ADMINISTRATION
 @property (nonatomic,copy) NSString *method;
 */
+(OuptPrescListModel *)setPrescListModel:(NSDictionary *)dic{
    OuptPrescListModel *model = [[OuptPrescListModel alloc] init];
    NSString *dateStr = dic[@"VISIT_DATE"];
    NSString *resultDate = dateStr.length>5? [dateStr substringToIndex:(dateStr.length-8)] : dateStr;
    
    model.visitDate = resultDate;
    model.visitNo = dic[@"VISIT_NO"];
    model.depeName = dic[@"DEPT_NAME"];
    model.doctor = dic[@"DOCTOR"];
    model.drugName = dic[@"DRUG_NAME"];
    model.units = dic[@"UNITS"];
    model.amount = dic[@"AMOUNT"];
    model.method = dic[@"ADMINISTRATION"];
    return model;
}

@end
